package com.common.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 *
 * </p>
 *
 * @author lzl
 * @since 2022-09-06
 */
@TableName("qd_bottom_article")
@ApiModel(value = "BottomArticle对象", description = "")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BottomArticle implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    private String id;

    @ApiModelProperty("导航名称")
    private String name;

    @ApiModelProperty("启用状态")
    private Integer isDisable;

    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty("父类id")
    private String parentId;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;

    @TableField(exist = false)
    private List<BottomArticle> children;

    @Override
    public String toString() {
        return "BottomArticle{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", isDisable=" + isDisable +
                ", isDeleted=" + isDeleted +
                ", parentId='" + parentId + '\'' +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                ", children=" + children +
                '}';
    }
}
